home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmConnection
- BorderStyle = 0 'None
- ClientHeight = 3165
- ClientLeft = 1140
- ClientTop = 1515
- ClientWidth = 4020
- ControlBox = 0 'False
- Height = 3570
- Left = 1080
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 3165
- ScaleWidth = 4020
- ShowInTaskbar = 0 'False
- Top = 1170
- Width = 4140
- Begin VB.Timer Timer1
- Interval = 100
- Left = 120
- Top = 2400
- End
- Begin VB.TextBox txtAccount
- Height = 285
- Left = 1080
- TabIndex = 10
- Top = 1200
- Width = 2175
- End
- Begin VB.TextBox txtPassword
- Height = 285
- Left = 1080
- TabIndex = 9
- Top = 840
- Width = 2175
- End
- Begin VB.TextBox txtUsername
- Height = 285
- Left = 1080
- TabIndex = 8
- Top = 480
- Width = 2175
- End
- Begin VB.TextBox txtHost
- Height = 285
- Left = 1080
- TabIndex = 4
- Top = 120
- Width = 2175
- End
- Begin VB.CommandButton cmdReinit
- Caption = "Reinit"
- Enabled = 0 'False
- Height = 375
- Left = 2280
- TabIndex = 2
- Top = 1800
- Width = 975
- End
- Begin VB.CommandButton cmdDisconnect
- Caption = "Disconnect"
- Enabled = 0 'False
- Height = 375
- Left = 1200
- TabIndex = 1
- Top = 1800
- Width = 975
- End
- Begin VB.CommandButton cmdConnect
- Caption = "Connect"
- Height = 375
- Left = 120
- TabIndex = 0
- Top = 1800
- Width = 975
- End
- Begin VB.Label Label4
- Alignment = 1 'Right Justify
- Caption = "Account:"
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 1200
- Width = 855
- End
- Begin VB.Label Label3
- Alignment = 1 'Right Justify
- Caption = "Password:"
- Height = 255
- Left = 120
- TabIndex = 6
- Top = 840
- Width = 855
- End
- Begin VB.Label Label2
- Alignment = 1 'Right Justify
- Caption = "Username:"
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 480
- Width = 855
- End
- Begin VB.Label Label1
- Alignment = 1 'Right Justify
- Caption = "Host:"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 120
- Width = 855
- End
- Attribute VB_Name = "frmConnection"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim fConnected As Boolean
- Private Sub cmdConnect_Click()
- MainForm.Ftp1.Host = txtHost.Text
- MainForm.Ftp1.LogonName = txtUsername.Text
- MainForm.Ftp1.LogonPassword = txtPassword.Text
- MainForm.Ftp1.Account = txtAccount.Text
- MainForm.Ftp1.Action = FtpActionConnect
- End Sub
- Private Sub cmdDisconnect_Click()
- MainForm.Ftp1.Action = FtpActionDisconnect
- End Sub
- Private Sub cmdReinit_Click()
- MainForm.Ftp1.Action = FtpActionReinitialize
- End Sub
- Private Sub Form_Load()
- txtHost.Text = "ftp.mabry.com"
- txtUsername.Text = "anonymous"
- txtPassword.Text = "test@ftp.ocx"
- fConnected = False
- Me.Show
- End Sub
- Private Sub Timer1_Timer()
- If (fConnected = False And MainForm.Ftp1.State = 1) Then
- cmdDisconnect.Enabled = True
- cmdConnect.Enabled = False
- cmdReinit.Enabled = True
- fConnected = True
- ElseIf (fConnected = True And MainForm.Ftp1.State = 0) Then
- cmdDisconnect.Enabled = Not True
- cmdConnect.Enabled = Not False
- cmdReinit.Enabled = Not True
- fConnected = False
- End If
- End Sub
-